-
-
Notifications
You must be signed in to change notification settings - Fork 46.6k
The tanh activation function is added #8689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
@@ -0,0 +1,44 @@ | |||
""" | |||
This script demonstrates the implementation of the tangent hyperbolic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor suggestion I have is to add a brief description of what the function does at the beginning of the docstring. For example:
"""
Implements the tangent hyperbolic or tanh function.
The function takes a vector of K real numbers as input and then applies
the tanh function to each element of the vector. The output values are
mostly in the range (-1, 1).
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for suggestion✌✌.
@cclauss kindly review, if need any change then please suggest. |
* tanh function been added * tanh function been added * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * tanh function is added * tanh function is added * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * tanh function added * tanh function added * tanh function is added * Apply suggestions from code review --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <[email protected]>
* tanh function been added * tanh function been added * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * tanh function is added * tanh function is added * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * tanh function added * tanh function added * tanh function is added * Apply suggestions from code review --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <[email protected]>
Describe your change:
The tanh activation function is added
mathematically (e^x - e^(-x))/(e^x + e^(-x)) redesigned to (2/(1+e^(-2x))-1
Checklist:
Fixes: #{$ISSUE_NO}
.